﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dropit.BlogPageProvider.Blog
{
	public interface IBlogProvider
	{
		List<IBlog> GetBlogs(Connection connection);
		IBlog GetBlogById(Connection connection, string id);
		IComment GetCommentById(Connection connection, string id);
		List<IComment> GetComments(Connection connection, string id);
		IPost GetPostById(Connection connection, string id);
		List<IPost> GetPosts(Connection connection, string id);

		IPost CreatePost(Connection connection);
		IComment CreateComment(Connection connection);
		string SavePost(Connection connection, string parentId, IPost post);
		void UpdatePost(Connection connection, IPost post);
		string SaveComment(Connection connection, string parentId, IComment comment);
		void UpdateComment(Connection connection, IComment comment);
		void DeletePost(Connection connection, string id);
		void DeleteComment(Connection connection, string id);
	}
}
